<%- include top %>
<header class="navbar navbar-inverse navbar-fixed-top bs-docs-nav" role="banner">
  <div class="container">
    <div class="navbar-header">
      <a href="/" class="navbar-brand">Money</a>
    </div>
    <nav class="navbar-collapse bs-navbar-collapse" role="navigation">
      <ul class="nav navbar-nav">
        <li>
          <a href="/">首页</a>
        </li>
        <li class="dropdown">
            <a href="#" class="dropdown-toggle" data-toggle="dropdown">广场<b class="caret"></b></a>
            <ul class="dropdown-menu">
              <li><a href="/baike">行情</a></li>
            </ul>
        </li>
        <% if(user){ %>
        <li>
          <a href="people/<%= user.name %>">个人主页</a>
        </li>
        <% } %>
        <li>
          <a href="../components">设置</a>
        </li>
      </ul>
      <% if(user){%>
      <div class="navbar-form navbar-right" id="isloginOut" style="display:none">
        <div class="form-group ">
          <input type="text" placeholder="用户名" class="form-control" id="headName">
        </div>
        <div class="form-group">
          <input type="password" placeholder="密码" class="form-control" id="headPassword">
        </div>
        <button type="submit" class="btn btn-success" id="headerLogin">登陆</button>
        <a href="/login" class="btn btn-default" role="button">注册</a>
        </ul>
      </div>
      <ul class="nav navbar-nav navbar-right" id="islogin">
        <li class="dropdown">
            <a href="#" class="dropdown-toggle" data-toggle="dropdown"><span id="headShowName" top="<%= user.top %>" login="in"><%= user.name%></span><b class="caret"></b></a>
            <ul class="dropdown-menu">
              <li><a href="setting">设置</a></li>
              <% if(locals.isStock){ %>
              <li><a id="loginOut" loginOut="target">注销</a></li>
              <% }else{ %>
              <li><a id="loginOut">注销</a></li>
              <% } %>
            </ul>
        </li>
      </ul>
      <% }else{ %>
      <div class="navbar-form navbar-right" id="isloginOut">
        <div class="form-group ">
          <input type="text" placeholder="用户名" class="form-control" id="headName">
        </div>
        <div class="form-group">
          <input type="password" placeholder="密码" class="form-control" id="headPassword">
        </div>
        <button type="submit" class="btn btn-success" id="headerLogin">登陆</button>
        <a href="/login" class="btn btn-default" role="button">注册</a>
        </ul>
      </div>
      <ul class="nav navbar-nav navbar-right" id="islogin" style="display:none">
        <li class="dropdown">
            <a href="#" class="dropdown-toggle" data-toggle="dropdown"><span id="headShowName" login="out" ></span><b class="caret"></b></a>
            <ul class="dropdown-menu">
              <li><a href="/baike">设置</a></li>
              <li><a id="loginOut">注销</a></li>
            </ul>
        </li>
      </ul>
      <% } %>
    </nav>

  </div>
</header>

<script src="js/min/header.min.js"></script>